import request from "@/utils/request";
//获取组织加购数据
export function getDepartment() {
  return request({
    url: "/company/department",
  });
}
// /sys/user/simple
//获取-部门负责人列表

export function getManagerList() {
  return request({
    url: "/sys/user/simple",
  });
}

//新增-部门
export function addDepartment(data) {
  return request({
    url: "/company/department",
    method: "post",
    data,
  });
}
// 获取-部门详情
// 开发中
// GET
// /company/department/{id}
export function getDepartmentDetail(data) {
  return request({
    url: `/company/department/${data}`,
    method: "get",
  });
}
// 修改-部门详情
// 开发中
// PUT
// /company/department/{id}
export function updateDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: "put",
    data,
  });
}
// 删除-部门
// 开发中
// DELETE
// /company/department/{id}
export function delDepartment(data) {
  return request({
    url: `/company/department/${data}`,
    method: "delete",
  });
}
